﻿Imports System.Data.SqlClient

Public Class about
    Inherits System.Web.UI.Page
    Dim objrd As SqlDataReader = Nothing

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim objdt As New GetData
        Dim ps As New PreparedStatement("select * from Category where lang_flag='en' order by category_name")
        Dim strErr As String = ""
        '  ps.addParameter("id", 123)
        Dim conn As SqlConnection = objdt.getConn()

        objrd = objdt.dr(ps, strErr, conn, objrd)
        Dim strCat As String = ""
        Dim strCol As String = ""
        strCat = ""
        While (objrd.Read())
            strCat &= "<li><a href=""category_default.aspx?cid=" & objrd.Item("category_id") & """>" & objrd.Item("category_name") & "</a></li>"
        End While
        categorylist.InnerHtml = strCat

        ps.strSql = "select * from Columns where lang_flag='en'order by Column_Name"
        objrd = objdt.dr(ps, strErr, conn, objrd)


        While (objrd.Read())
            strCol &= "<li><a href=""column_default.aspx?aid=" & objrd.Item("Column_ID") & """>" & objrd.Item("Column_Name") & "</a></li>"
        End While
        objdt.closeConn(conn)

        columnlist.InnerHtml = strCol
    End Sub

End Class